package de.kardass.jannobatch.examples.simple;

import de.kardass.jannobatch.ItemProcessor;
import de.kardass.jannobatch.examples.simple.data.SimpleInputItem;
import de.kardass.jannobatch.examples.simple.data.SimpleOutputItem;

public class SimpleModule implements ItemProcessor<SimpleInputItem, SimpleOutputItem> {

	@Override
	public void onStartUp() {
		System.out.println("..." + getClass() + "-> init");
	}

	@Override
	public void onShutDown() {
		System.out.println("..." + getClass() + "-> finish");
	}

	@Override
	public SimpleOutputItem process(SimpleInputItem item) {
		System.out.println("..." + getClass() + "-> process - input: " + item);
		
//		throw new RuntimeException("A test!");
		
		return new SimpleOutputItem(item, "out");
	}

}
